project(
    'bspline-fortran',
    'fortran',
    version: '0.1.0',
    license: 'BSD-3-Clause',
    meson_version: '>= 1.1.0',
    default_options: ['buildtype=release', 'fortran_std=f2008'],
)

fargs = ['-ffree-line-length-none', '-fimplicit-none', '-cpp']

opt_real_type = get_option('real_type')

fargs += ['-D@0@'.format(opt_real_type)]

bspline_src = files()
subdir('src')

bspline_lib = library(
    meson.project_name(),
    bspline_src,
    version: meson.project_version(),
    fortran_args: fargs,
    install: true,
)
bspline_dep = declare_dependency(
    link_with: bspline_lib,
    include_directories: bspline_lib.private_dir_include(),
)
